package com.example.demo.model.req;

import com.example.demo.pojo.WorkOrderDO;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class WoWorkTrackingGoodReq {
    private static final long serialVersionUID = 1L;

    /**
     * 工单id
     */
    private String workOrderId;

    /**
     * 跟进记录
     */
    private String trackingInfo;


    /**
     * 跟进时间
     */
    private Date trackingTime;
    /**
     * 跟进人
     */
    private String trackingStaff;

    /**
     * 跟进状态
     */
    private String trackingStatus;

    /**
     * 未完成原因
     */
    private String incompleteReason;
    /**
     * 表扬原因
     */
    private String praiseReason;
    /**
     * 预计完成时间
     */
    private Date estimateDealTime;

    /**
     * 是否有附件
     */
    private String hasAttachment;

    /**
     * 抄送人
     */
    private List<String> copyPeopleList;

    public WorkOrderDO reqToDto(WoWorkTrackingGoodReq trackingSaveReq)
    {
        WorkOrderDO  woWorkTrackingDTO = new WorkOrderDO();
        if(trackingSaveReq == null){
            return woWorkTrackingDTO;
        }else {
            woWorkTrackingDTO.setKind("表扬");
            woWorkTrackingDTO.setPraiseReason(trackingSaveReq.getPraiseReason());
            woWorkTrackingDTO.setHasAttachment(trackingSaveReq.getHasAttachment());
            woWorkTrackingDTO.setWorkOrderId(trackingSaveReq.getWorkOrderId());
            woWorkTrackingDTO.setTrackingInfo(trackingSaveReq.getTrackingInfo());
            woWorkTrackingDTO.setEstimateDealTime(trackingSaveReq.getEstimateDealTime());
            woWorkTrackingDTO.setTrackingStatus(trackingSaveReq.getTrackingStatus());
            woWorkTrackingDTO.setTrackingStaff(trackingSaveReq.getTrackingStaff());
            woWorkTrackingDTO.setIncompleteReason(trackingSaveReq.getIncompleteReason());
            woWorkTrackingDTO.setHasAttachment(trackingSaveReq.getHasAttachment());
            woWorkTrackingDTO.setTrackingTime(trackingSaveReq.getTrackingTime());
            return woWorkTrackingDTO;

        }
    }
}
